package com.plian.system.entity.fr.procurement;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @description: 大宗物资采购信息表
 * @author: gangan
 * @create: 2020-05-15 10:48
 */
@Data
@TableName("fr_material_procurement")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MaterialProcurement对象", description = "大宗物资采购信息表")
public class MaterialProcurement extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "单据编码")
    private String code;

    @ApiModelProperty(value = "填报单位")
    private String fillingUnitId;

    @ApiModelProperty(value = "填报年度")
    private String fillingYear;

    @ApiModelProperty(value = "采购单位")
    private String procurementCompanyName;

    @ApiModelProperty(value = "采购单位级次")
    private String procurementCompanyRankId;

    @ApiModelProperty(value = "采购项目")
    private String procurementProject;

    @ApiModelProperty(value = "预算金额")
    private BigDecimal budget;

    @ApiModelProperty(value = "采购分类")
    private String procurementCategoryId;

    @ApiModelProperty(value = "采购平台")
    private String procurementPlatform;

    @ApiModelProperty(value = "采购平台分类")
    private String procurementPlatformCategoryId;

    @ApiModelProperty(value = "采购方式")
    private String procurementWayId;

    @ApiModelProperty(value = "采购合同金额")
    private BigDecimal procurementContractAmount;

    @ApiModelProperty(value = "采购发生服务费用金额")
    private BigDecimal procurementCoverCharge;

    @ApiModelProperty(value = "供应商")
    private String supplier;

    @ApiModelProperty(value = "其中宁波优质产品采购额")
    private BigDecimal qualityProductsProcurement;

    @ApiModelProperty(value = "其中宁波优质产品采购占比")
    private BigDecimal qualityProductsProportion;

    @ApiModelProperty(value = "其中宁波自主创新产品采购额")
    private BigDecimal innovationProductsProcurement;

    @ApiModelProperty(value = "其中宁波自主创新产品采购占比")
    private BigDecimal innovationProductsProportion;

    @ApiModelProperty(value = "其中宁波市信用示范小微企业产品采购额")
    private BigDecimal creditEnterprisesProcurement;

    @ApiModelProperty(value = "其中宁波市信用示范小微企业产品采购占比")
    private BigDecimal creditEnterprisesProportion;

    @ApiModelProperty(value = "代理机构名称")
    private String agencyName;

    @ApiModelProperty(value = "是否签订补充合同 1否2是")
    private Integer isSupplementaryContract;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "审批时间")
    private Date approvedTime;

    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    @ApiModelProperty(value = "流程实例id")
    private String formType;

    @TableField(exist = false)
    @ApiModelProperty(value = "合同列表")
    private List<ProcurementContract> procurementContracts;

    @TableField(exist = false)
    @ApiModelProperty(value = "决策文件")
    private List<HashMap> docList;

    @TableField(exist = false)
    @ApiModelProperty(value = "决策文件id")
    private List<Long> decisionDocIds;

    @ApiModelProperty(value = "决策或批复单位名称")
    private String decisionCompanyName;

    @ApiModelProperty(value = "决策或批复文件名")
    private String decisionFileName;

    @ApiModelProperty(value = "决策或批复文件号")
    private String decisionFileNumber;

    @ApiModelProperty(value = "数据来源 默认0位监管平台填报  1阳光采购平台同步")
    private String dataSource;

    @ApiModelProperty(value = "数据来源id")
    private String dataSourceId;

    @ApiModelProperty(value = "成交日期 yyyy-MM-dd")
    private String fixtureDate;
}
